

**cd "location"
capture log close
use "QATARAID_RAW.dta" ,clear
log using "Figures 1-2.log", append


**Figure 1. Income group orientation of Qatar's aid operations (2014–2021)
graph bar (count), over(year)  blabel(bar) by(WB_incomegroup)

**Figure 2. Qatar's aid operations by implementing agency and channel (2014–2021)

#delimit ;
graph bar if agency!=".", over(agency, descending) asyvars blabel(bar) stack
   bar(1, color(gs13))
   bar(2, color(gs8))
   bar(3, color(gs5))
   bar(4, color(gs3))
   graphregion(fcolor(white))
   ytitle("Percentage")
   title("Implementing Agency")
   subtitle("2014-2021")
   note("Source: QATARAID-RAW") 
 ;

graph save "Graph" "agency_v2.gph" ;
 
graph bar if channel!=".", over(channel) asyvars blabel(bar) 
   bar(1, color(gs13))
   bar(2, color(gs8))
   bar(3, color(gs5))
   graphregion(fcolor(white))
   ytitle("Percentage")
   title("Channel")
   subtitle("2014-2021")
   note("Source: QATARAID-RAW") 
 ;

graph save "Graph" "channel_v2.gph";
graph combine "channel_v2.gph" "agency_v2.gph";
 
graph save "Graph" "Figure 2.gph";
 #delimit cr
 
 log close